Iterator Example for absolute beginner in Python